package com.lie.usercenter.aop.service.impl;

import com.google.gson.Gson;
import com.lie.usercenter.aop.domain.SysLogDO;
import com.lie.usercenter.aop.service.SysLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Arrays;

/**
 * 日志记录
 * @author MTF
 * @date 20221122
 */
@Slf4j
@Service
public class SysLogServiceImpl implements SysLogService {

    @Override
    public boolean sava(SysLogDO sysLogDO) {
        try{
            log.info("request, url = {}, className = {}, mothodName = {}, params = {}, remark = {}",
                    sysLogDO.getUrl(),sysLogDO.getClassName(),sysLogDO.getMothodName(), Arrays.toString(sysLogDO.getParams()),sysLogDO.getRemark());
        }catch (Exception e){
            log.info(e.toString());
        }

        return true;
    }
}
